//
//  MKAPITestForm.m
//  MKAPITests
//
//  Created by 苏尚进 on 2023/5/29.
//  Copyright © 2023 moon. All rights reserved.
//

#import "MKAPITestForm.h"

@interface MKAPITestForm ()
@property(nonatomic,strong) NSDictionary *postResult;
@end

@implementation MKAPITestForm

- (void)doRunTask{
    [super doRunTask];
    MKAPIRequestParamForm *requestParam = [[MKAPIRequestParamForm alloc] init];
    [self configCommonRequest:requestParam path:@"/post"];
    requestParam.formParam.PS(self.postParam.dictionary);
    requestParam.httpMethod = MKAPIHttpRequestMethodPOST;
    [self sendRequestWithParam:requestParam withCompletion:^(__kindof MKAPIHttpRequestBase * _Nullable requestTask, BOOL success, NSError * _Nullable error) {
        self.postResult = requestTask.responseJson[@"form"];
        [self completeWithError:error];
    }];
}
@end
